package com.ruleengine.task.condition.impl;

import com.ruleengine.parser.ITaskContants;
import com.ruleengine.task.condition.ICondition;

public class DefaultCondition implements ICondition {

    private String expr;
    
    public DefaultCondition(String expr) {
        super();
        this.expr = expr;
    }

    public void setExpression(String expr) {
        this.expr = expr;
    }

    public String getExpression() {
        return this.expr;
    }


    @Override
    public String toString() {
        // TODO Auto-generated method stub
        StringBuffer tag = new StringBuffer();
        tag.append("<"+ITaskContants.ELE_TAG_CONDITION+">");
        tag.append("<"+ITaskContants.ELE_TAG_EXPRESSION+">"+expr+"</"+ITaskContants.ELE_TAG_EXPRESSION+">");
        tag.append("</"+ITaskContants.ELE_TAG_CONDITION+">");
        return tag.toString();
    }

    
}
